#pragma once

namespace ZeEngine
{
    class IMouseListener;

    class InputManager
    {
        friend class GameEngine;

    public:
        InputManager();
        ~InputManager();

        static void AddMouseListener(IMouseListener* pListener, const std::string& name);
        static void RemoveMouseListener(const std::string& name);

        static const Vector2D<s32>& GetAbsoluteMousePosition() { return m_mousePosition; }

    private:
        static bool HandleEvent(SDL_Event& evt);

    private:
        static std::map<std::string, u32>             m_mouseIndexes;
        static std::vector<IMouseListener*>           m_sortedMouseListeners;
        static Vector2D<s32>                          m_mousePosition;

    };
}

